﻿// alert
alert('hello js introduction');
// let
let greetingText = 'hello js introduction use let';


//Arrays
let hobbies = ['Sports', 'Cooking', 'Reading'];


//Objects
let job = {
    title: 'Developer',
    place: 'SH',
    salary: 5000
};

//Function
function calculateAdultYears(userAge) {
    return userAge - 18;
}

console.log((calculateAdultYears(25)));

let person = {
    name: 'Max',
    greet() {
        console.log('hello!');
    }
}

// 调用greet方法
person.greet();

